<template>
    <div >
        <div class="swipe">
            <mt-swipe :auto="4000" style="height: 200px;">
                <mt-swipe-item v-for="item in swepData" :key="item.id">
                    <img :src="item.img" alt="" class="swipe_img">
                </mt-swipe-item>
            </mt-swipe>
        </div>
        

         <ul class="mui-table-view mui-grid-view mui-grid-9">
                    <router-link to="mainHome_news" tag="li" class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-4">
                        <a href="#">
		                    <img src="../../images/menu1.png" alt="" class="menu_img">
		                    <div class="mui-media-body menu_text">新闻资讯</div></a>
                    </router-link>
 
		            <router-link to="imgShare" class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-4"><a href="#">
		                   <img src="../../images/menu2.png" alt="" class="menu_img">
		                    <div class="mui-media-body menu_text">租房查询</div></a>
                    </router-link>

		            <router-link to="shop" tag="li" class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-4"><a href="#">
		                    <img src="../../images/menu3.png" alt="" class="menu_img">
		                    <div class="mui-media-body menu_text">商品购买</div></a></router-link>
		            <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-4"><a href="#">
		                    <img src="../../images/menu4.png" alt="" class="menu_img">
		                    <div class="mui-media-body menu_text">留言反馈</div></a></li>
		            <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-4"><a href="#">
		                    <img src="../../images/menu5.png" alt="" class="menu_img">
		                    <div class="mui-media-body menu_text">视频专区</div></a></li>
		            <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-4"><a href="#">
		                    <img src="../../images/menu6.png" alt=""  class="menu_img">
		                    <div class="mui-media-body menu_text">联系我们</div></a></li>
		    </ul> 
    </div>
</template>

<style scoped>
    .swipe_img{
        width: 100%;
    }

    .mui-grid-view.mui-grid-9{
        background-color: white;
        border-color: white;
    }
    .mui-grid-view.mui-grid-9 .mui-table-view-cell{
         border-color: white;
    }
    .menu_img{
        width: 50px;
    }
    .menu_text{
        font-size: 20px;
        line-height: 20px;
        height: 20px;
    }


</style>

<script>
import {Toast} from 'mint-ui';

export default {
    data(){
        return {
            swepData:[],
        }

    },
    created() {
        this.swipeInit()
    },
    methods:{
		swipeInit:function(){
            this.$http.get("slideshow/get").then(function(res){
                let ok = res.ok;
                if(!ok){
                    Toast("请求数据失败")
                    return 
                }
                
                let data = res.body.data;
                this.swepData = data;
            });
        }

	},
}
</script>
